<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Chengying Blog</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="/site_media/colorimetry/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!-- start header -->
<div id="header">
	<div id="logo">
		<h1><a href="/blog/">Chengying Blog<sup></sup></a></h1>
		<h2>Another blog</h2>
	</div>
	<div id="menu">
		<ul>
			<li class="active"><a href="/blog/">Home</a></li>
			<li><a href="#">photos</a></li>
			<li><a href="#">about</a></li>
			<li><a href="#">links</a></li>
			<li><a href="#">contact </a></li>
		</ul>
	</div>
</div>
<!-- end header -->
<!-- start page -->
<div id="page">
	<!-- start content -->
	<div id="content">
		<div class="post">
			<h1 class="title">Results for "{{ query|escape }}":</h1>
			<div class="entry">
				<p>
				<h3>Count:{{ total|escape }}</h3>
				{% if query %}
				{% if results %}
				{#% for title in titles %#}
				{% for res in results %}
				<li><a href="/article/{{ res.id }}">{{ res.title }}</a></li>
				{% endfor %}
				{#% endfor %#}
				<!--
				{% for x in results %}
				<li> {{ x }} </li>
				{% endfor %}
				<a href="/article/{{ article.id }}">{{ article.title }}</a>
				-->
				{% else %}
				<p> No result found! <p> 
				{% endif %}
				{% endif %}
				</p>
			</div>
		</div>
	</div>
	<!-- end content -->
	<!-- start sidebar -->
	<div id="sidebar">
		<ul>
			<li id="search">
				<h2>Search</h2>
				<form method="get" action="">
					<fieldset>
					<input type="text" id="s" name="s" value="" />
					<input type="submit" id="x" value="Search" />
					</fieldset>
				</form>
			</li>
			<li>
				<h2>Category</h2>
				<ul>
					{% if category_list %}
						{% for category in category_list %}
						<li><a href="#">{{ category.name }}</a></li>
						{% endfor %}
					{% endif %}

				</ul>
			<li>
				<h2>Recent Post</h2>
				<ul>
				{% if art_list %}
					{% for article in art_list %}
					<li><a href="/blog/{{ article.id }}">{{ article.title }}</a></li>
					{% endfor %}
				{% else %}  
					<p>No Article!</p>
				{% endif %}
				</ul>
			</li>
		</ul>
	</div>
	<!-- end sidebar -->
	<div style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->
<!-- start footer -->
<div id="footer">
	<p id="legal">(c) 2008 YourSite. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div>
<!-- end footer -->
</body>
</html>
